/*
 * XML Type:  EReference
 * Namespace: http://www.eclipse.org/emf/2002/Ecore
 * Java type: org.eclipse.emf.x2002.ecore.EReference
 *
 * Automatically generated - do not modify.
 */
package org.eclipse.emf.x2002.ecore.impl;
/**
 * An XML EReference(@http://www.eclipse.org/emf/2002/Ecore).
 *
 * This is a complex type.
 */
public class EReferenceImpl extends org.eclipse.emf.x2002.ecore.impl.EStructuralFeatureImpl implements org.eclipse.emf.x2002.ecore.EReference
{
    private static final long serialVersionUID = 1L;
    
    public EReferenceImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CONTAINMENT$0 = 
        new javax.xml.namespace.QName("", "containment");
    private static final javax.xml.namespace.QName CONTAINER$2 = 
        new javax.xml.namespace.QName("", "container");
    private static final javax.xml.namespace.QName RESOLVEPROXIES$4 = 
        new javax.xml.namespace.QName("", "resolveProxies");
    private static final javax.xml.namespace.QName EOPPOSITE$6 = 
        new javax.xml.namespace.QName("", "eOpposite");
    private static final javax.xml.namespace.QName EREFERENCETYPE$8 = 
        new javax.xml.namespace.QName("", "eReferenceType");
    
    
    /**
     * Gets the "containment" attribute
     */
    public boolean getContainment()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CONTAINMENT$0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "containment" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetContainment()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(CONTAINMENT$0);
            return target;
        }
    }
    
    /**
     * True if has "containment" attribute
     */
    public boolean isSetContainment()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(CONTAINMENT$0) != null;
        }
    }
    
    /**
     * Sets the "containment" attribute
     */
    public void setContainment(boolean containment)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CONTAINMENT$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CONTAINMENT$0);
            }
            target.setBooleanValue(containment);
        }
    }
    
    /**
     * Sets (as xml) the "containment" attribute
     */
    public void xsetContainment(org.eclipse.emf.x2002.ecore.EBoolean containment)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(CONTAINMENT$0);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(CONTAINMENT$0);
            }
            target.set(containment);
        }
    }
    
    /**
     * Unsets the "containment" attribute
     */
    public void unsetContainment()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(CONTAINMENT$0);
        }
    }
    
    /**
     * Gets the "container" attribute
     */
    public boolean getContainer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CONTAINER$2);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "container" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetContainer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(CONTAINER$2);
            return target;
        }
    }
    
    /**
     * True if has "container" attribute
     */
    public boolean isSetContainer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(CONTAINER$2) != null;
        }
    }
    
    /**
     * Sets the "container" attribute
     */
    public void setContainer(boolean container)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CONTAINER$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CONTAINER$2);
            }
            target.setBooleanValue(container);
        }
    }
    
    /**
     * Sets (as xml) the "container" attribute
     */
    public void xsetContainer(org.eclipse.emf.x2002.ecore.EBoolean container)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(CONTAINER$2);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(CONTAINER$2);
            }
            target.set(container);
        }
    }
    
    /**
     * Unsets the "container" attribute
     */
    public void unsetContainer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(CONTAINER$2);
        }
    }
    
    /**
     * Gets the "resolveProxies" attribute
     */
    public boolean getResolveProxies()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(RESOLVEPROXIES$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(RESOLVEPROXIES$4);
            }
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "resolveProxies" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetResolveProxies()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(RESOLVEPROXIES$4);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_default_attribute_value(RESOLVEPROXIES$4);
            }
            return target;
        }
    }
    
    /**
     * True if has "resolveProxies" attribute
     */
    public boolean isSetResolveProxies()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(RESOLVEPROXIES$4) != null;
        }
    }
    
    /**
     * Sets the "resolveProxies" attribute
     */
    public void setResolveProxies(boolean resolveProxies)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(RESOLVEPROXIES$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(RESOLVEPROXIES$4);
            }
            target.setBooleanValue(resolveProxies);
        }
    }
    
    /**
     * Sets (as xml) the "resolveProxies" attribute
     */
    public void xsetResolveProxies(org.eclipse.emf.x2002.ecore.EBoolean resolveProxies)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(RESOLVEPROXIES$4);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(RESOLVEPROXIES$4);
            }
            target.set(resolveProxies);
        }
    }
    
    /**
     * Unsets the "resolveProxies" attribute
     */
    public void unsetResolveProxies()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(RESOLVEPROXIES$4);
        }
    }
    
    /**
     * Gets the "eOpposite" attribute
     */
    public java.lang.String getEOpposite()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EOPPOSITE$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "eOpposite" attribute
     */
    public org.apache.xmlbeans.XmlAnyURI xgetEOpposite()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnyURI target = null;
            target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_attribute_user(EOPPOSITE$6);
            return target;
        }
    }
    
    /**
     * True if has "eOpposite" attribute
     */
    public boolean isSetEOpposite()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(EOPPOSITE$6) != null;
        }
    }
    
    /**
     * Sets the "eOpposite" attribute
     */
    public void setEOpposite(java.lang.String eOpposite)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EOPPOSITE$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EOPPOSITE$6);
            }
            target.setStringValue(eOpposite);
        }
    }
    
    /**
     * Sets (as xml) the "eOpposite" attribute
     */
    public void xsetEOpposite(org.apache.xmlbeans.XmlAnyURI eOpposite)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnyURI target = null;
            target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_attribute_user(EOPPOSITE$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().add_attribute_user(EOPPOSITE$6);
            }
            target.set(eOpposite);
        }
    }
    
    /**
     * Unsets the "eOpposite" attribute
     */
    public void unsetEOpposite()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(EOPPOSITE$6);
        }
    }
    
    /**
     * Gets the "eReferenceType" attribute
     */
    public java.lang.String getEReferenceType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EREFERENCETYPE$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "eReferenceType" attribute
     */
    public org.apache.xmlbeans.XmlAnyURI xgetEReferenceType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnyURI target = null;
            target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_attribute_user(EREFERENCETYPE$8);
            return target;
        }
    }
    
    /**
     * True if has "eReferenceType" attribute
     */
    public boolean isSetEReferenceType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(EREFERENCETYPE$8) != null;
        }
    }
    
    /**
     * Sets the "eReferenceType" attribute
     */
    public void setEReferenceType(java.lang.String eReferenceType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EREFERENCETYPE$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EREFERENCETYPE$8);
            }
            target.setStringValue(eReferenceType);
        }
    }
    
    /**
     * Sets (as xml) the "eReferenceType" attribute
     */
    public void xsetEReferenceType(org.apache.xmlbeans.XmlAnyURI eReferenceType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnyURI target = null;
            target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_attribute_user(EREFERENCETYPE$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().add_attribute_user(EREFERENCETYPE$8);
            }
            target.set(eReferenceType);
        }
    }
    
    /**
     * Unsets the "eReferenceType" attribute
     */
    public void unsetEReferenceType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(EREFERENCETYPE$8);
        }
    }
}
